#ifndef __ARCH_UM_INCLUDE_STUB_H__
#define __ARCH_UM_INCLUDE_STUB_H__

#include <types.h>

struct stub_frame {
	uint32_t eax;
	uint32_t ebx;
	uint32_t ecx;
	uint32_t edx;
	uint32_t esi;
	uint32_t edi;
};

struct stub_stack {
	struct stub_frame frame;
	void* end;
};

extern void* __syscall_stub_start;
extern void* __syscall_stub_end;

void stub_entry (void);
void stub_start (void);
void stub_segv_handler (int sig);
void stub_exec_syscall ();

#endif  // __ARCH_UM_INCLUDE_STUB_H__
